<?xml version="1.0" encoding="utf-8"?>
<!-- This comment will force IE7 to go into quirks mode. -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<link rel="stylesheet" type="text/css" href="../../CSS/Contents.css"></link>
<script type="text/javascript" src="../../JS/Common.js"></script>
<title>CodeGen.Function&lt;T&gt; Method (Type, string, MethodAttributes, bool, Action&lt;ILGenerator&gt;)</title>
</head>
<body>
<div id="Header">
<div id="ProjectTitle">Documentation Project</div>
<div id="PageTitle">CodeGen.Function&lt;T&gt; Method (Type, string, MethodAttributes, bool, Action&lt;ILGenerator&gt;)</div>
<div id="HeaderShortcuts">
<a href="#SectionHeader0" onclick="javascript: SetSectionVisibility(0, true); SetExpandCollapseAllToCollapseAll();">Syntax</a>&nbsp;
</div>
<div class="DarkLine"></div>
<div class="LightLine"></div>
<div id="HeaderToolbar">
<img id="ExpandCollapseAllImg" src="../../GFX/SmallSquareExpanded.gif" alt="" style="vertical-align: top;" onclick="javascript: ToggleAllSectionsVisibility();" />
<span id="ExpandCollapseAllSpan" onclick="javascript: ToggleAllSectionsVisibility();">Collapse All</span>
</div>
</div>
<div id="Contents">
<a id="ContentsAnchor">&nbsp;</a>
Create a dynamic method.
<div id="ItemLocation">
<b>Declaring type:</b> <a href="../../Contents/1/216.html">CodeGen</a><br />
<b>Namespace:</b> <a href="../../Contents/1/208.html">Sasa</a><br />
<b>Assembly:</b> <a href="../../Contents/1/1.html">Sasa</a>
</div>
<div id="SectionHeader0" class="SectionHeader">
<img id="SectionExpanderImg0" src="../../GFX/BigSquareExpanded.gif" alt="Collapse/Expand" onclick="javascript: ToggleSectionVisibility(0);" />
<span class="SectionHeader">
<span class="ArrowCursor" onclick="javascript: ToggleSectionVisibility(0);">
Syntax
</span>
</span>
</div>

<div id="SectionContainerDiv0" class="SectionContainer">
<table class="CodeTable"><col width="100%" /><tr class="CodeTable"><th class="CodeTable">C#</th></tr><tr class="CodeTable"><td class="CodeTable"><pre style="margin-left: 2px;">public static T Function&lt;T&gt; (
        Type <i>type</i>,
        string <i>methodName</i>,
        MethodAttributes <i>attributes</i>,
        bool <i>saveAssembly</i>,
        Action&lt;ILGenerator&gt; <i>generate</i>
) </pre>
<div style="padding-left: 30px; margin-top: 0px;">
<table class="InsideCodeBlock">
<col />
<col width="100%" />
<tr>
<td class="NoWrapTop">where T</td>
<td>&nbsp;: Delegate</td>
</td>
</tr>
</table>
</div>
</td></tr></table>
<div class="CommentHeader">Type Parameters</div>
<div class="CommentParameterName">T</div>
<div class="ParameterCommentContainer">
The type of the dynamic method to create.
</div>
<div class="CommentHeader">Parameters</div>
<div class="CommentParameterName">type</div>
<div class="ParameterCommentContainer">
The type to which this delegate should be a member.
</div>
<div class="CommentParameterName">methodName</div>
<div class="ParameterCommentContainer">
The name of the delegate's method.
</div>
<div class="CommentParameterName">attributes</div>
<div class="ParameterCommentContainer">
The method attributes.
</div>
<div class="CommentParameterName">saveAssembly</div>
<div class="ParameterCommentContainer">
Flag indicating whether the generated code should be saved to a dll.
</div>
<div class="CommentParameterName">generate</div>
<div class="ParameterCommentContainer">
A call back that performs the code generation.
</div>
<div class="CommentHeader">Return Value</div>
<div class="ParameterCommentContainer">
An dynamically created instance of the given delegate type.
</div>
<div class="TopLink"><a href="#ContentsAnchor">Top</a></div></div>
</div>
<div id="Footer">
<span class="Footer">Generated by <a href="http://immdocnet.codeplex.com/" target="_blank">ImmDoc .NET</a></span>.
</div>

</body>

</html>
